<template>
  <div style="height: 100vh;background-size: cover;background-position-x: center;background-image: url('https://s1.hdslb.com/bfs/static/blive/blfe-message-web/static/img/infocenterbg.a1a0d152.jpg')">
        <template v-for="i in message">
          <div  :key="i.userId" @click="chart(i.userId)">
            <message-item :messaga-info="i"/>
          </div>
          <el-divider/>
        </template>
  </div>
</template>

<script>
import MessageItem from "@/components/messageItem";
import {requests} from "@/utils/request";
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "message",
  data(){
    return{
      message:[],

    }
  },
  mounted() {
    requests.get("/message/list").then(res=>{
      this.message=res.data.data
    })
  },
  methods:{
    chart(id){
      this.$router.push({
        path:'/index/chart',
        query:{
          id:id
        }
      })
    }
  },
  components: {MessageItem}
}
</script>

<style >

</style>